Repository navigation
Record a Skill from the bot's browser (reusing user-takeover CDP listener, redacting Secrets) - #384
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #377.
Lets a person teach a bot a repeatable browser workflow once by performing it in the bot's Chrome window, producing a plain, editable
SKILL.mdreviewed in a sheet before saving:appd/src/browser.rs):bateUserbinding (WORLD = "bate", invisible to page scripts) while a recording session is active to capture navigated URLs (open), clicked element roles/accessible labels/selectors (click), dropdown picks (select), and typed fields (type) up to 100 steps.type="password"andautocomplete="one-time-code"fields never have their.valueread or transmitted.browser::draft_skill, password inputs are rendered withSecret: <name>(matching the bot's saved Secret for that host, orSecret: <secret-name>), and any non-password value matching or containing any saved Secret of the bot (plain, form-encoded, or URL-encoded) is replaced withSecret: <name>.appd/src/skills.rs,appd/src/core.rs):start_recording(runs Chrome launch/attach offCore::run, setsrecording: trueonBot),stop_recording(drains steps, redacts againstsecrets_of(bot), draftsSKILL.md), andsave_recorded_skill(validatesSKILL.mdviaproto::skills::parseand installs atomically throughskills::install_texts).window/uiandnative(window/ui/src/Skills.tsx,native/src/skills.rs):SKILL.mdtext area and bot picker to save or discard.Evidence
cd window/ui && npm ci && npm run build && npm test: 142/142 passed.cargo fmt --all --check: clean.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo test --workspace --locked: all crates passed, including:appdunit test:browser::tests::recorded_steps_draft_a_skill_with_passwords_and_secrets_redacted.appd --test service:record_skill_from_browser_redacts_passwords_and_secrets_and_refuses_devices(fake CDP pipe verifyingstart_recording,stop_recording, password + saved Secret redaction,save_recorded_skill, and LAN Deviceforbiddenrefusal).native --test addons:record_skill_from_browser_and_review_sheet_saves_skillplus visually verified light/dark Skills snapshots.Merge Danger
Low. Existing user-takeover detection on
bateUseris preserved unchanged; recording is inert unless explicitly started by the local window.Device decision
start_recording,stop_recording, andsave_recorded_skillare all listed inREFUSED_OVER_LAN(appd/src/lan.rs) and refusedforbiddento paired Devices, matchingpreview_skill,install_skill, anddiscover_skills. Documented inPROTOCOL.md.